<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>联系人编辑-AddressBook</title>
    <!-- Bootstrap core CSS -->
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link th:href="@{/css/dashboard.css}" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
    <style type="text/css">
        /* Chart.js */

        @-webkit-keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        @keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        .chartjs-render-monitor {
            -webkit-animation: chartjs-render-animation 0.001s;
            animation: chartjs-render-animation 0.001s;
        }
    </style>
</head>

<body>
<div th:replace="~{commons/commons::topbar}"></div>

<div class="container-fluid">
    <div class="row">
        <div th:replace="~{commons/commons::sidebar(active='list.html')}"></div>

        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
            <form th:action="@{/user/changePerson}" method="post">
                <input type="hidden" name="personId" th:value="${personInfo.getPersonId()}">
                <input type="hidden" name="userId" th:value="${personInfo.getUserId()}">
                <div class="form-group">
                    <label>姓名</label>
                    <input th:value="${personInfo.getPersonName()}" type="text" name="personName" class="form-control" required="required" placeholder="必填">
                </div>
                <div class="form-group">
                    <label>手机</label>
                    <input th:value="${personInfo.getPersonPhone1()}" type="tel" name="personPhone1" class="form-control" required="required" placeholder="必填">
                </div>
                <div class="form-group">
                    <label>电话</label>
                    <input th:value="${personInfo.getPersonPhone2()}" type="text" name="personPhone2" class="form-control" placeholder="(空)">
                </div>
                <div class="form-group">
                    <label>微信</label>
                    <input th:value="${personInfo.getPersonWechat()}" type="text" name="personWechat" class="form-control" placeholder="(空)">
                </div>
                <div class="form-group">
                    <label>QQ</label>
                    <input th:value="${personInfo.getPersonQq()}" type="text" name="personQq" class="form-control" placeholder="(空)">
                </div>

                <div class="form-group">
                    <label>邮箱</label>
                    <input th:value="${personInfo.getPersonMail()}" type="email" name="personMail" class="form-control" placeholder="(空)">
                </div>

                <div class="form-group">
                    <label>Icon</label>
                    <input th:value="${personInfo.getPersonIcon()}" type="text" name="personIcon" class="form-control" placeholder="(空)">
                </div>

                <div class="form-group">
                    <label>工作单位</label>
                    <input th:value="${personInfo.getPersonCompany()}" type="text" name="personCompany" class="form-control" placeholder="(空)">
                </div>
                <div class="form-group">
                    <label>家庭住址</label>
                    <input th:value="${personInfo.getPersonAddress()}" type="text" name="personAddress" class="form-control" placeholder="(空)">
                </div>
                <div class="form-group">
                    <label>生日</label>
                    <input th:value="${#dates.format(personInfo.getPersonBirthday(),'yyyy-MM-dd')}" type="date" name="personBirthday" class="form-control" placeholder="(空)">
                </div>
                <div class="form-group">
                    <label>邮编</label>
                    <input th:value="${personInfo.getPersonPostcode()}" type="text" name="personPostCode" class="form-control" placeholder="(空)">
                </div>
                <div class="form-group">
                    <label>备注</label>
                    <input th:value="${personInfo.getPersonRemark()}" type="text" name="personRemark" class="form-control" placeholder="(空)">
                </div>
              <!--  <div class="form-group">
                    <label>性别</label><br/>
                    <div class="form-check form-check-inline">
                        <input class="form-check-input" type="radio" name="gender" value="1">
                        <label class="form-check-label">男</label>
                    </div>
                    <div class="form-check form-check-inline">
                        <input class="form-check-input" type="radio" name="gender" value="0">
                        <label class="form-check-label">女</label>
                    </div>
                </div>-->

                <div class="form-group">
                    <!--<label>部门选择</label>
                    <select class="form-control" th:name="department.id">
                        <option th:each="dept:${departments}" th:text="${dept.getDepartmentName()}" th:value="${dept.getId()}"/>
                    </select>-->
                    <label>分组选择</label>
                    <select  class="form-control" name="categoryId" >
                        <option th:selected="${category.getCategoryId()==personInfo.getCategoryId()}" th:each="category:${categoryList}" th:text="${category.getCategoryName()}" th:value="${category.getCategoryId()}">
                        </option>
                    </select>
                </div>

                <button type="submit" class="btn btn-primary">修改</button>
            </form>
        </main>
    </div>
</div>

<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" src="asserts/js/jquery-3.2.1.slim.min.js"></script>
<script type="text/javascript" src="asserts/js/popper.min.js"></script>
<script type="text/javascript" src="asserts/js/bootstrap.min.js"></script>

<!-- Icons -->
<script type="text/javascript" src="asserts/js/feather.min.js"></script>
<script>
    feather.replace()
</script>

<!-- Graphs -->
<script type="text/javascript" src="asserts/js/Chart.min.js"></script>
<script>
    var ctx = document.getElementById("myChart");
    var myChart = new Chart(ctx, {
        type: 'line',
        data: {
            labels: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
            datasets: [{
                data: [15339, 21345, 18483, 24003, 23489, 24092, 12034],
                lineTension: 0,
                backgroundColor: 'transparent',
                borderColor: '#007bff',
                borderWidth: 4,
                pointBackgroundColor: '#007bff'
            }]
        },
        options: {
            scales: {
                yAxes: [{
                    ticks: {
                        beginAtZero: false
                    }
                }]
            },
            legend: {
                display: false,
            }
        }
    });
</script>

</body>

</html>
